<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::PrecomputedMatrix&lt; Matrix &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_precomputed_matrix.html">PrecomputedMatrix</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_precomputed_matrix-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::PrecomputedMatrix&lt; Matrix &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Precomputed version of a matrix for quadratic programming.  
 <a href="classshark_1_1_precomputed_matrix.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_precomputed_matrix_8h_source.html">shark/LinAlg/PrecomputedMatrix.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad1c1324ed83e7f4f81a9f405e03ebe0f" id="r_ad1c1324ed83e7f4f81a9f405e03ebe0f"><td class="memItemLeft" align="right" valign="top">typedef Matrix::QpFloatType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a></td></tr>
<tr class="separator:ad1c1324ed83e7f4f81a9f405e03ebe0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abea0cbaf28e2260105a01e2d1bac9098" id="r_abea0cbaf28e2260105a01e2d1bac9098"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#abea0cbaf28e2260105a01e2d1bac9098">PrecomputedMatrix</a> (Matrix *base)</td></tr>
<tr class="separator:abea0cbaf28e2260105a01e2d1bac9098"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23d4a870760436710e017f9df9bf4e05" id="r_a23d4a870760436710e017f9df9bf4e05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#a23d4a870760436710e017f9df9bf4e05">row</a> (std::size_t k, std::size_t start, std::size_t end, <a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a> *storage) const</td></tr>
<tr class="memdesc:a23d4a870760436710e017f9df9bf4e05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the i-th row of the kernel matrix.  <br /></td></tr>
<tr class="separator:a23d4a870760436710e017f9df9bf4e05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa44b4d1498fefde0e18bad7fead45585" id="r_aa44b4d1498fefde0e18bad7fead45585"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#aa44b4d1498fefde0e18bad7fead45585">row</a> (std::size_t k, std::size_t begin, std::size_t end)</td></tr>
<tr class="memdesc:aa44b4d1498fefde0e18bad7fead45585"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a subset of a matrix row.  <br /></td></tr>
<tr class="separator:aa44b4d1498fefde0e18bad7fead45585"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac878d742d220a264960bf9228a150d1b" id="r_ac878d742d220a264960bf9228a150d1b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#ac878d742d220a264960bf9228a150d1b">operator()</a> (std::size_t i, std::size_t j) const</td></tr>
<tr class="memdesc:ac878d742d220a264960bf9228a150d1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">return a single matrix entry  <br /></td></tr>
<tr class="separator:ac878d742d220a264960bf9228a150d1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affc89e5345755891cb4351a6727635cb" id="r_affc89e5345755891cb4351a6727635cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#affc89e5345755891cb4351a6727635cb">entry</a> (std::size_t i, std::size_t j) const</td></tr>
<tr class="memdesc:affc89e5345755891cb4351a6727635cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">return a single matrix entry  <br /></td></tr>
<tr class="separator:affc89e5345755891cb4351a6727635cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd1fa57020581514752ebe16a7505b4c" id="r_abd1fa57020581514752ebe16a7505b4c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#abd1fa57020581514752ebe16a7505b4c">flipColumnsAndRows</a> (std::size_t i, std::size_t j)</td></tr>
<tr class="memdesc:abd1fa57020581514752ebe16a7505b4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">swap two variables  <br /></td></tr>
<tr class="separator:abd1fa57020581514752ebe16a7505b4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a364ec759346a474311590ac8dd45093e" id="r_a364ec759346a474311590ac8dd45093e"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#a364ec759346a474311590ac8dd45093e">size</a> () const</td></tr>
<tr class="memdesc:a364ec759346a474311590ac8dd45093e"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the size of the quadratic matrix  <br /></td></tr>
<tr class="separator:a364ec759346a474311590ac8dd45093e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e36ccd9be149aac6003fa1e92afb7db" id="r_a3e36ccd9be149aac6003fa1e92afb7db"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#a3e36ccd9be149aac6003fa1e92afb7db">getMaxCacheSize</a> ()</td></tr>
<tr class="memdesc:a3e36ccd9be149aac6003fa1e92afb7db"><td class="mdescLeft">&#160;</td><td class="mdescRight">for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>  <br /></td></tr>
<tr class="separator:a3e36ccd9be149aac6003fa1e92afb7db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8113f8b0c9f0ddf618a50da2d692c55" id="r_ae8113f8b0c9f0ddf618a50da2d692c55"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#ae8113f8b0c9f0ddf618a50da2d692c55">getCacheSize</a> () const</td></tr>
<tr class="memdesc:ae8113f8b0c9f0ddf618a50da2d692c55"><td class="mdescLeft">&#160;</td><td class="mdescRight">for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>  <br /></td></tr>
<tr class="separator:ae8113f8b0c9f0ddf618a50da2d692c55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeac6f451c9fc15fb9c0d0b448af95816" id="r_aeac6f451c9fc15fb9c0d0b448af95816"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#aeac6f451c9fc15fb9c0d0b448af95816">getCacheRowSize</a> (std::size_t k) const</td></tr>
<tr class="memdesc:aeac6f451c9fc15fb9c0d0b448af95816"><td class="mdescLeft">&#160;</td><td class="mdescRight">for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>  <br /></td></tr>
<tr class="separator:aeac6f451c9fc15fb9c0d0b448af95816"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39a2a5510b3f3727bcfa1cd5308a7447" id="r_a39a2a5510b3f3727bcfa1cd5308a7447"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#a39a2a5510b3f3727bcfa1cd5308a7447">isCached</a> (std::size_t)</td></tr>
<tr class="memdesc:a39a2a5510b3f3727bcfa1cd5308a7447"><td class="mdescLeft">&#160;</td><td class="mdescRight">for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>  <br /></td></tr>
<tr class="separator:a39a2a5510b3f3727bcfa1cd5308a7447"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac06d00ae0e964df3463682ab34fcffbb" id="r_ac06d00ae0e964df3463682ab34fcffbb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#ac06d00ae0e964df3463682ab34fcffbb">setMaxCachedIndex</a> (std::size_t n)</td></tr>
<tr class="memdesc:ac06d00ae0e964df3463682ab34fcffbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>  <br /></td></tr>
<tr class="separator:ac06d00ae0e964df3463682ab34fcffbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84e83ea244a5ae6d7c3881a653541ee3" id="r_a84e83ea244a5ae6d7c3881a653541ee3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#a84e83ea244a5ae6d7c3881a653541ee3">clear</a> ()</td></tr>
<tr class="memdesc:a84e83ea244a5ae6d7c3881a653541ee3"><td class="mdescLeft">&#160;</td><td class="mdescRight">for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>  <br /></td></tr>
<tr class="separator:a84e83ea244a5ae6d7c3881a653541ee3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a18ea2737f45148dc0ddb5bdfdd3430e2" id="r_a18ea2737f45148dc0ddb5bdfdd3430e2"><td class="memItemLeft" align="right" valign="top">blas::matrix&lt; <a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">matrix</a></td></tr>
<tr class="memdesc:a18ea2737f45148dc0ddb5bdfdd3430e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">container for precomputed values  <br /></td></tr>
<tr class="separator:a18ea2737f45148dc0ddb5bdfdd3430e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class Matrix&gt;<br />
class shark::PrecomputedMatrix&lt; Matrix &gt;</div><p>Precomputed version of a matrix for quadratic programming. </p>
<dl class="section user"><dt></dt><dd>The <a class="el" href="classshark_1_1_precomputed_matrix.html" title="Precomputed version of a matrix for quadratic programming.">PrecomputedMatrix</a> class computes all pairs of kernel evaluations in its constructor and stores them im memory. This proceeding is only viable if the number of examples does not exceed, say, about 10000. In this case the memory demand is already \( 4 \cdot 10000^2 \approx 400\text{MB} \), growing quadratically.</dd></dl>
<dl class="section user"><dt></dt><dd>Use of this class may be beneficial for certain model selection strategies, in particular if the kernel is fixed and the regularization parameter is varied.</dd></dl>
<dl class="section user"><dt></dt><dd>Use of this class may, in certain situations, even mean a loss is speed, compared to <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a>. This is the case in particular if the solution of the quadratic program is sparse, in which case most entries of the matrix do not need to be computed at all, and the problem is "simple" enough such that the solver's shrinking heuristic is not mislead. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00077">77</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="ad1c1324ed83e7f4f81a9f405e03ebe0f" name="ad1c1324ed83e7f4f81a9f405e03ebe0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1c1324ed83e7f4f81a9f405e03ebe0f">&#9670;&#160;</a></span>QpFloatType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef Matrix::QpFloatType <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::QpFloatType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00080">80</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="abea0cbaf28e2260105a01e2d1bac9098" name="abea0cbaf28e2260105a01e2d1bac9098"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abea0cbaf28e2260105a01e2d1bac9098">&#9670;&#160;</a></span>PrecomputedMatrix()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::PrecomputedMatrix </td>
          <td>(</td>
          <td class="paramtype">Matrix *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>matrix to be precomputed </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00084">84</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a84e83ea244a5ae6d7c3881a653541ee3" name="a84e83ea244a5ae6d7c3881a653541ee3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84e83ea244a5ae6d7c3881a653541ee3">&#9670;&#160;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00156">156</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

</div>
</div>
<a id="affc89e5345755891cb4351a6727635cb" name="affc89e5345755891cb4351a6727635cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affc89e5345755891cb4351a6727635cb">&#9670;&#160;</a></span>entry()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a> <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::entry </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return a single matrix entry </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00120">120</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_precomputed_matrix.html#ac878d742d220a264960bf9228a150d1b">shark::PrecomputedMatrix&lt; Matrix &gt;::operator()()</a>.</p>

</div>
</div>
<a id="abd1fa57020581514752ebe16a7505b4c" name="abd1fa57020581514752ebe16a7505b4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd1fa57020581514752ebe16a7505b4c">&#9670;&#160;</a></span>flipColumnsAndRows()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::flipColumnsAndRows </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>swap two variables </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00126">126</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

</div>
</div>
<a id="aeac6f451c9fc15fb9c0d0b448af95816" name="aeac6f451c9fc15fb9c0d0b448af95816"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeac6f451c9fc15fb9c0d0b448af95816">&#9670;&#160;</a></span>getCacheRowSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::getCacheRowSize </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00145">145</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

</div>
</div>
<a id="ae8113f8b0c9f0ddf618a50da2d692c55" name="ae8113f8b0c9f0ddf618a50da2d692c55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8113f8b0c9f0ddf618a50da2d692c55">&#9670;&#160;</a></span>getCacheSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::getCacheSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00141">141</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a3e36ccd9be149aac6003fa1e92afb7db">shark::PrecomputedMatrix&lt; Matrix &gt;::getMaxCacheSize()</a>.</p>

</div>
</div>
<a id="a3e36ccd9be149aac6003fa1e92afb7db" name="a3e36ccd9be149aac6003fa1e92afb7db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e36ccd9be149aac6003fa1e92afb7db">&#9670;&#160;</a></span>getMaxCacheSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::getMaxCacheSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00137">137</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_precomputed_matrix.html#ae8113f8b0c9f0ddf618a50da2d692c55">shark::PrecomputedMatrix&lt; Matrix &gt;::getCacheSize()</a>.</p>

</div>
</div>
<a id="a39a2a5510b3f3727bcfa1cd5308a7447" name="a39a2a5510b3f3727bcfa1cd5308a7447"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39a2a5510b3f3727bcfa1cd5308a7447">&#9670;&#160;</a></span>isCached()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::isCached </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00149">149</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

</div>
</div>
<a id="ac878d742d220a264960bf9228a150d1b" name="ac878d742d220a264960bf9228a150d1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac878d742d220a264960bf9228a150d1b">&#9670;&#160;</a></span>operator()()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a> <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::operator() </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return a single matrix entry </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00116">116</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#affc89e5345755891cb4351a6727635cb">shark::PrecomputedMatrix&lt; Matrix &gt;::entry()</a>.</p>

</div>
</div>
<a id="aa44b4d1498fefde0e18bad7fead45585" name="aa44b4d1498fefde0e18bad7fead45585"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa44b4d1498fefde0e18bad7fead45585">&#9670;&#160;</a></span>row() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a> * <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::row </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return a subset of a matrix row. </p>
<dl class="section user"><dt></dt><dd>This method returns an array with at least the entries in the interval [begin, end[ filled in.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>matrix row </td></tr>
    <tr><td class="paramname">begin</td><td>first column to be filled in </td></tr>
    <tr><td class="paramname">end</td><td>last column to be filled in +1 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00110">110</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

</div>
</div>
<a id="a23d4a870760436710e017f9df9bf4e05" name="a23d4a870760436710e017f9df9bf4e05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23d4a870760436710e017f9df9bf4e05">&#9670;&#160;</a></span>row() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::row </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a> *&#160;</td>
          <td class="paramname"><em>storage</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the i-th row of the kernel matrix. </p>
<p>The entries start,...,end of the i-th row are computed and stored in storage. There must be enough room for this operation preallocated. </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00094">94</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

</div>
</div>
<a id="ac06d00ae0e964df3463682ab34fcffbb" name="ac06d00ae0e964df3463682ab34fcffbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac06d00ae0e964df3463682ab34fcffbb">&#9670;&#160;</a></span>setMaxCachedIndex()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::setMaxCachedIndex </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>for compatibility with <a class="el" href="classshark_1_1_cached_matrix.html" title="Efficient quadratic matrix cache.">CachedMatrix</a> </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00153">153</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

</div>
</div>
<a id="a364ec759346a474311590ac8dd45093e" name="a364ec759346a474311590ac8dd45093e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a364ec759346a474311590ac8dd45093e">&#9670;&#160;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the size of the quadratic matrix </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00133">133</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_precomputed_matrix.html#a18ea2737f45148dc0ddb5bdfdd3430e2">shark::PrecomputedMatrix&lt; Matrix &gt;::matrix</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a18ea2737f45148dc0ddb5bdfdd3430e2" name="a18ea2737f45148dc0ddb5bdfdd3430e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18ea2737f45148dc0ddb5bdfdd3430e2">&#9670;&#160;</a></span>matrix</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">blas::matrix&lt;<a class="el" href="classshark_1_1_precomputed_matrix.html#ad1c1324ed83e7f4f81a9f405e03ebe0f">QpFloatType</a>&gt; <a class="el" href="classshark_1_1_precomputed_matrix.html">shark::PrecomputedMatrix</a>&lt; Matrix &gt;::matrix</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>container for precomputed values </p>

<p class="definition">Definition at line <a class="el" href="_precomputed_matrix_8h_source.html#l00161">161</a> of file <a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_precomputed_matrix.html#affc89e5345755891cb4351a6727635cb">shark::PrecomputedMatrix&lt; Matrix &gt;::entry()</a>, <a class="el" href="classshark_1_1_precomputed_matrix.html#abd1fa57020581514752ebe16a7505b4c">shark::PrecomputedMatrix&lt; Matrix &gt;::flipColumnsAndRows()</a>, <a class="el" href="classshark_1_1_precomputed_matrix.html#aeac6f451c9fc15fb9c0d0b448af95816">shark::PrecomputedMatrix&lt; Matrix &gt;::getCacheRowSize()</a>, <a class="el" href="classshark_1_1_precomputed_matrix.html#a3e36ccd9be149aac6003fa1e92afb7db">shark::PrecomputedMatrix&lt; Matrix &gt;::getMaxCacheSize()</a>, <a class="el" href="classshark_1_1_precomputed_matrix.html#abea0cbaf28e2260105a01e2d1bac9098">shark::PrecomputedMatrix&lt; Matrix &gt;::PrecomputedMatrix()</a>, <a class="el" href="classshark_1_1_precomputed_matrix.html#aa44b4d1498fefde0e18bad7fead45585">shark::PrecomputedMatrix&lt; Matrix &gt;::row()</a>, <a class="el" href="classshark_1_1_precomputed_matrix.html#a23d4a870760436710e017f9df9bf4e05">shark::PrecomputedMatrix&lt; Matrix &gt;::row()</a>, and <a class="el" href="classshark_1_1_precomputed_matrix.html#a364ec759346a474311590ac8dd45093e">shark::PrecomputedMatrix&lt; Matrix &gt;::size()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/LinAlg/<a class="el" href="_precomputed_matrix_8h_source.html">PrecomputedMatrix.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
